package com.test.com.bluetoothchatandroid.adapter;

import android.bluetooth.BluetoothDevice;
import android.content.Context;

import com.test.com.bluetoothchatandroid.R;

/**
 * Created by ${cs} on 2018/4/18.
 * @author saviorT
 */

public class ListAdapter extends  EasyRecyclerViewAdapter{

	private Context mContext;

	public ListAdapter(Context mContext) {
		this.mContext = mContext;
	}

	@Override
	public int[] getItemLayouts() {
		return new int[]{R.layout.item_add_layout};
	}

	@Override
	public void onBindRecycleViewHolder(EasyRecyclerViewHolder viewHolder, int position) {
		BluetoothDevice item = getItem(position);
		viewHolder.setText(R.id.leftTv,"设备"+position);
		viewHolder.setText(R.id.nameTv,"名称:"+item.getName());
		viewHolder.setText(R.id.contentTv,"mac地址："+item.getAddress());

	}

	@Override
	public int getRecycleViewItemType(int position) {
		return 0;
	}
}
